﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LitJson;
using OestsCommon.Model;
using LNet;
using OestsDataBase;
using OestsServer.Net;

namespace OestsServer.Handlers.OESPHandlers
{
	public class ModifyTrueOrFalseHandler : HandlerBase<OESPClientChannel>
	{
		public override PacketKey PKey => PacketKey.ModifyTrueOrFalse;

		public override void Execute(OESPClientChannel client, Request resquestPacket)
		{
			TrueOrFalse tf = JsonMapper.ToObject<TrueOrFalse>(resquestPacket.DataStr);
			SubjectTrueOrFalseDAL.Modify(tf);
			ResponsePacket.DataObject = tf;
			client.Send(ResponsePacket);

		}
	}
}
